**** Replication - PSRM ****

** This R Script replicates the analysis for Appendix Tables B4, B5, B6, 
* and Appendix Table F2 in "Differential Efficacy of Survey Incentives 
* Across Contexts: Experimental Evidence from Australia, India, and the United States" 



********************************************************************************
******************			AUSTRALIA BALANCE CHECKS		********************
********************************************************************************

clear 
use "aus_incentives_psrm.dta", clear

log using Tables/tableb4.log
*************************************************************
* Table B4: Balance Across Treatment Groups At Assignment: Teach For Australia
*************************************************************

** Only use variables from administrative data (not survey data)
* admit = admitted(=1 if admitted to TFA)
* selectionday = (=1 if attended selection day)
* female = gender(=1 if female)
* european = of European descent (=1 if yes)
* age_proxy = age group 

foreach var of varlist admit selection_day female european age_proxy {
	oneway `var' treatment if complete!=.
	}	

* Report Bartlett's equal-variances test, p-value, df, N for each variable 

log close

********************************************************************************
******************			INDIA BALANCE CHECKS		************************
********************************************************************************


clear 
use "ind_incentives_psrm.dta", clear

log using Tables/tableb5.log

*************************************************************
* Table B5: Balance Across Treatment Groups At Assignment: Teach For India
*************************************************************
* Based on Administrative Data


* cohort_master = cohort year (2009-2014)
* accepted_master = admission status (=1 if admitted; 0 = not admitted)
* female_master (=1 if female; 0 = male)

foreach var of varlist cohort_master accepted_master female_master {
	oneway `var' treatment if complete!=.
	}	

* Report Bartlett's equal-variances test, p-value, df, N for each variable 


log close 

********************************************************************************
******************			U.S. BALANCE CHECKS		************************
********************************************************************************


clear 
use "us_incentives_psrm.dta", clear


log using Tables/tableb6.log

*************************************************************
*Table B6: Balance Across Treatment Groups at Assignment: Teach For America
*************************************************************

* admit = admitted(=1 if admitted to TFA)
* matriculated4 = matriculated (=1 if participated in TFA)
* gpa2 = college GPA
* schoolselective = selectivity score of the college
* female3 = gender(=1 if female)
* white2 = race is white (=1 if white)
* pell = pell grant recipient (indicates low income; =1 if received pell grant)
* parentalcollege2 = whether or not parent went to college ( =1 if parent went to college)

foreach var of varlist admit matriculated4 gpa2 schoolselective female3 white2 pell parentalcollege2 {
	oneway `var' treatment if complete!=.
	}	

* Report Bartlett's equal-variances test, p-value, df, N for each variable 

log close 	

	
********************************************************************************
******************		U.S. BALANCE CHECKS, 2024	************************
********************************************************************************


clear 
use "us2024_incentive_psrm.dta", clear


log using Tables/tablef2.log

*************************************************************
*Table F2: Balance Across Treatment Groups at Assignment: Teach For America, 2024 Study
*************************************************************

* admitted = admitted(=1 if admitted to TFA)
* matriculated = matriculated (=1 if participated in TFA)
* cumulativegpa = college GPA
* selective = selectivity score of the college
* female = gender(=1 if female)
* white = appethnicity is white (=1 if European)
* pellgrant = pell grant recipient (indicates low income; =1 if received pell grant)
* age = age


foreach var of varlist admitted matriculated cumulativegpa selective female white pellgrant age {
	oneway `var' treatment if complete!=.
	}	

* Report Bartlett's equal-variances test, p-value, df, N for each variable 

log close
